#ifndef GAME_H
#define GAME_H
#include"Manager.h"
#include <QWidget>
class QPainter;
class Game : public QWidget
{
    Q_OBJECT
public:
    explicit Game(QWidget *parent = nullptr);
    void run();
    void initGame(int w,int h,const QString &title);
    void cleanGame();
    void updateGame();
    void drawGame(QPainter *painter);

protected:
    void paintEvent(QPaintEvent *event)override;
    void closeEvent(QCloseEvent *ev)override;
    void keyPressEvent(QKeyEvent *ev)override;
    void keyReleaseEvent(QKeyEvent *ev)override;
private:
signals:
};
#endif // GAME_H
